package xyz.hzxiao.option.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.hzxiao.entity.option.OptionsEntity;
import xyz.hzxiao.option.service.OptionsService;
import xyz.hzxiao.result.JsonResult;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author FuXx
 * @since 2024-12-04
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/option")
public class OptionsController {

    private final OptionsService optionsService;

    @RequestMapping("/list")
    public JsonResult<List<OptionsEntity>> list(String fatherId) {
        return optionsService.queryOpeionList(fatherId);
    }

}
